home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / Illustrator 6.0 SDK r1 Mac / AI Plugin Interface / AIFileFormat.h < prev    next >
Text File  |  1995-12-21  |  3KB  |  126 lines

  1. /**
  2.  
  3.     AIFileFormat.h
  4.     Copyright (c) 1995 Adobe Systems Incorporated.
  5.     All Rights Reserved
  6.  
  7.     Adobe Illustrator 6.0 File Format Suite.
  8.  
  9.  **/
  10.  
  11. #ifndef __AIFileFormat__
  12. #define __AIFileFormat__
  13.  
  14.  
  15. /*******************************************************************************
  16.  **
  17.  **    Imports
  18.  **
  19.  **/
  20.  
  21. #include "AITypes.h"
  22. #include "AIPlugin.h"
  23.  
  24.  
  25. /*******************************************************************************
  26.  **
  27.  ** Constants
  28.  **
  29.  **/
  30.  
  31. #define kAIFileFormatSuite            "AI File Format Suite"
  32. #define kAIFileFormatVersion        4
  33. #define kAIMacFileFormatSuite        "AI Mac File Format Suite"
  34. #define kAIMacFileFormatVersion        2
  35.  
  36.  
  37. // These are the file format messages.
  38. #define kSelectorAIGetFileFormatParameters    "AI Get File Format Parameters"
  39. #define kSelectorAIGoFileFormat                "AI Go File Format"
  40. #define kSelectorAICheckFileFormat            "AI Check File Format"
  41.  
  42.  
  43. // These are the file format options.
  44. #define kFileFormatRead                            (1L<<0)
  45. #define kFileFormatWrite                        (1L<<1)
  46. #define kFileFormatImportArt                    (1L<<2)
  47. #define kFileFormatPlaceArt                        (1L<<3)
  48. //
  49. #define kFileFormatImportStyles                    (1L<<4)
  50. #define kFileFormatSuppliesPrintRecordOption    (1L<<5)
  51. #define kFileFormatIsDefaultOption                (1L<<6)
  52.  
  53.  
  54. // Artwork Notifiers
  55. #define kAIFileFormatDocumentOpenedNotifier        "AI File Format Document Opened Notifier"
  56.  
  57.  
  58. #define kUnknownFormatErr        'FMT?'
  59.  
  60.  
  61. /*******************************************************************************
  62.  **
  63.  ** Types
  64.  **
  65.  **/
  66.  
  67. // This is a reference to a file format. It is never dereferenced.
  68. typedef struct _t_AIFileFormatOpaque *AIFileFormatHandle;
  69.  
  70.  
  71. #if Macintosh
  72. typedef Handle PlatformFileFormatParameters;
  73. typedef FSSpec PlatformFileFormatFileSpecification;
  74.  
  75. typedef struct {
  76.     OSType type;
  77.     StringPtr title;
  78.     long titleOrder;
  79. } PlatformAddFileFormatData;
  80. #endif
  81.  
  82. typedef struct {
  83.     AIPluginData d;
  84.     AIFileFormatHandle fileFormat;
  85.     PlatformFileFormatFileSpecification file;
  86.     long option;
  87. } AIFileFormatMessage;
  88.  
  89.  
  90. /*******************************************************************************
  91.  **
  92.  **    Suite
  93.  **
  94.  **/
  95.  
  96. typedef struct {
  97.  
  98.     MACPASCAL FXErr (*AddFileFormat) ( AIPluginHandle self, char *name,
  99.                 PlatformAddFileFormatData *data, long options,
  100.                 AIFileFormatHandle *fileFormat );
  101.  
  102.     MACPASCAL FXErr (*GetFileFormatName) ( AIFileFormatHandle fileFormat, char **name );
  103.     MACPASCAL FXErr (*GetFileFormatOptions) ( AIFileFormatHandle fileFormat, long *options );
  104.     MACPASCAL FXErr (*SetFileFormatOptions) ( AIFileFormatHandle fileFormat, long options );
  105.     MACPASCAL FXErr (*GetFileFormatPlugin) ( AIFileFormatHandle fileFormat,
  106.                 AIPluginHandle *plugin );
  107.  
  108.     MACPASCAL FXErr (*CountFileFormats) ( long *count );
  109.     MACPASCAL FXErr (*GetNthFileFormat) ( long n, AIFileFormatHandle *fileFormat );
  110.  
  111. } AIFileFormatSuite;
  112.  
  113.  
  114. #if Macintosh
  115. typedef struct {
  116.  
  117.     MACPASCAL FXErr (*MacXGetFileFormatTitle) ( AIFileFormatHandle fileFormat, StringPtr title );
  118.     MACPASCAL FXErr (*MacXSetFileFormatTitle) ( AIFileFormatHandle fileFormat, StringPtr title );
  119.     MACPASCAL FXErr (*MacXGetFileFormatType) ( AIFileFormatHandle fileFormat, OSType *type );
  120.     MACPASCAL FXErr (*MacXSetFileFormatType) ( AIFileFormatHandle fileFormat, OSType type );
  121.  
  122. } AIMacFileFormatSuite;
  123. #endif
  124.  
  125. #endif
  126.